/**
 * 广寒宫
 * 网址:www.guanghangong.xyz
 */
package com.moon.admin.framework.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 分页查询参数
 * @author ninlong
 */
@Getter
@Setter
public class Query {

	@ApiModelProperty(value = "当前页")
	private int page;
	@ApiModelProperty(value = "从哪一条数据开始",hidden = false)
	private int start;
	@ApiModelProperty(value = "每页显示")
	private int limit;
	
	public int getStart(){
		int start = 0;
    	if(page>1){
    		start = (page-1) * limit;
    	}
    	return start;
	}
}
